/*File Name		: mpoint.c*/
/*Date			: 24-9-2012 */
/*Maker Name	: Jonathan Ery Pradana / 23512038*/
/*Driver untuk ADT Point*/

#include <stdio.h>
#include "point.h"

int main(){
	printf("ADT Point Driver.\n");
	/* int x,y;
	printf("Please input x and y integer value separated by enter : \n");
	scanf("%d", &x);
	scanf("%d", &y);
	Point P = MakePoint(x,y); */
	Point P;
	ReadPoint(&P);
	printf("Cek tostring : %s\n", PointToString(P));
	printf("P value= x:%d y:%d\n", GetAbsis(P), GetOrdinat(P));
	if (IsOrigin(P)){
		printf("P is origin.\n");
	}else{
		printf("P is not origin.\n");
	}
	
	printf("\nMake Point P1 with value (0,0)\n");
	Point P1 = MakePoint(0,0);
	printf("P1 value= x:%d y:%d\n", GetAbsis(P1), GetOrdinat(P1));
	if (IsOrigin(P1)){
		printf("P1 is origin.\n");
	}else{
		printf("P1 is not origin.\n");
	}
	
	printf("\nChanging P1 to (3,2)\n");
	SetAbsis(&P1,3);
	SetOrdinat(&P1,2);
	printf("P1 value= x:%d y:%d\n", GetAbsis(P1), GetOrdinat(P1));
	
	printf("\nIs P and P1 equal?\n");
	if (EqPoint(P,P1)){
		printf("Yes\n");
	}else{
		printf("No\n");
	}
	
	printf("\nMirroring P\n");
	MirroringPoint(&P);
	printf("P value= x:%d y:%d\n", GetAbsis(P), GetOrdinat(P));
	
	printf("\nMoving P1 with value: -3 horizontally, -2 vertically.\n");
	MovePoint(&P1,-3,-2);
	printf("P1 value= x:%d y:%d\n", GetAbsis(P1), GetOrdinat(P1));
	
	
	return 0;
}
